//
// Created on 2025-08-12.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#ifndef HMSERIALIZATION_ERROR_H
#define HMSERIALIZATION_ERROR_H

#include <napi/native_api.h>

typedef enum {
    napi_param_number_error = 25,
    napi_param_type_error,
} napi_errno;

typedef enum {
    YYJSON_CREATE_STATE_FAILED = 15,
    YYJSON_CREATE_DOC_FAILED,
} yyjson_errno;

struct Napi_Error {
    const char* code;
    const char* msg;
};

void handleNapiError(napi_env env, size_t err);

void handleYYJSONError(napi_env env, size_t err);

#endif //HMSERIALIZATION_ERROR_H
